Home

Operator Usage

Name

find-path-between

Description

find-path-between(ket1, ket2)
Use Dijkstra's algorithm to find the shortest path between ket1 and ket2
See: https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
To instead find the operators required to get from ket1 to ket2 see find-operators-between().


Examples

-- learn a grid, then find a path:
learn-grid[10, 10]
find-path-between(|grid: 0: 0>, |grid: 5: 5>)
    |grid: 0: 0> . |grid: 1: 1> . |grid: 2: 2> . |grid: 3: 3> . |grid: 4: 4> . |grid: 5: 5>


See also

Operator type

context function 2